package com.autoglm.data.model

/**
 * GLM API请求模型
 */
data class GLMChatRequest(
    val model: String,
    val messages: List<GLMMessage>,
    val temperature: Double = 0.7,
    val max_tokens: Int = 2048,
    val top_p: Double = 0.9,
    val stream: Boolean = false
)

/**
 * GLM消息模型
 */
data class GLMMessage(
    val role: String, // "system", "user", "assistant"
    val content: String
)

/**
 * GLM API响应模型
 */
data class GLMChatResponse(
    val id: String,
    val object: String,
    val created: Long,
    val model: String,
    val choices: List<GLMChoice>,
    val usage: GLMUsage
)

/**
 * GLM选择项模型
 */
data class GLMChoice(
    val index: Int,
    val message: GLMMessage,
    val finish_reason: String
)

/**
 * GLM使用统计模型
 */
data class GLMUsage(
    val prompt_tokens: Int,
    val completion_tokens: Int,
    val total_tokens: Int
)

/**
 * 任务规划请求模型
 */
data class TaskPlanningRequest(
    val userInput: String,
    val currentApp: String? = null,
    val availableApps: List<String> = emptyList(),
    val context: Map<String, String> = emptyMap()
)

/**
 * 任务规划响应模型
 */
data class TaskPlanningResponse(
    val task: Task,
    val confidence: Double,
    val alternatives: List<Task> = emptyList(),
    val suggestions: List<String> = emptyList()
)

/**
 * 指令理解请求模型
 */
data class IntentUnderstandingRequest(
    val userInput: String,
    val context: Map<String, String> = emptyMap()
)

/**
 * 指令理解响应模型
 */
data class IntentUnderstandingResponse(
    val intent: String,
    val entities: Map<String, String>,
    val confidence: Double,
    val originalInput: String,
    val processedInput: String
)
